﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

namespace Emerald
{
    public enum EColor : byte
    {
        White = 0,
        Red = 1
    }

    public static class EColorExtensions
    {
        public static Color GetColor(this EColor c)
        {
            switch (c)
            {
                case EColor.Red:
                    return Color.Red;
                case EColor.White:
                    return Color.White;
                default:
                    return Color.Gray;
            }
        }

        public static Color GetSelectedColor(this EColor c)
        {
            switch (c)
            {
                case EColor.Red:
                    return Color.Tomato;
                case EColor.White:
                    return Color.LightGray;
                default:
                    return Color.Gray;
            }
        }
        public static EColor Opposite(this EColor c)
        {
            switch (c)
            {
                case EColor.Red:
                    return EColor.White;
                case EColor.White:
                    return EColor.Red;
                default:
                    throw new Exception("Should not happen");
            }
        }

        public static string ToString(this EColor c)
        {
            switch (c)
            {
                case EColor.Red:
                    return "Red";
                case EColor.White:
                    return "White";
                default:
                    return "Gray";
            }
        }

    }

}
